.book-notes-container {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  min-height: 250px;

  .notes-content {
    flex: 1;
    height: 100%;
    overflow: hidden;
  }

  .action-bar {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    z-index: 1000;
  }
}

.empty-state {
  position: relative;
  padding: 3rem !important;

  .empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  .empty-state-subtitle {
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
  }

  .empty-state-decoration {
    position: absolute;
    top: 20%;
    right: 15%;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    filter: blur(40px);
    animation: float 4s ease-in-out infinite;
  }
}

.notes-scroll-container {
  overflow-x: auto;
  overflow-y: hidden;
  height: 100%;

  &::-webkit-scrollbar {
    height: 10px;
  }

  &::-webkit-scrollbar-track {
    background: rgba(30, 30, 30, 0.5);
    border-radius: 10px;
  }

  scrollbar-width: thin;
}

.notes-horizontal-list {
  display: flex;
  gap: 1.5rem;
  padding: 0.5rem;
}

.note-card {
  width: 500px;
  height: 240px;
  flex-shrink: 0;
  padding: 0;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--p-content-border-color);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);


  @media (max-width: 768px) {
    width: 340px;
    height: 220px;
  }

  @media (max-width: 480px) {
    width: 290px;
    height: 200px;
  }

  &:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--primary-color), transparent 50%);

    .note-bottom-glow {
      opacity: 1;
    }

    .action-btn-hover {
      opacity: 1;
      transform: scale(1);
    }
  }

  .note-header {
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.8), rgba(30, 30, 30, 0.8));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;

    .note-title {
      max-width: 350px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      background: linear-gradient(135deg, #f8fafc, #e2e8f0);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;

      @media (max-width: 768px) {
        max-width: 200px;
        font-size: 1rem;
      }

      @media (max-width: 480px) {
        max-width: 180px;
        font-size: 0.9rem;
      }
    }

    .note-meta {
      display: flex;
      align-items: center;
      opacity: 0.8;

      i {
        color: #3b82f6;
      }
    }

    .note-actions {
      display: flex;
      gap: 0.5rem;
      flex-shrink: 0;

      .action-btn-hover {
        opacity: 0.7;
        transition: all 0.3s ease;
        transform: scale(0.9);

        ::ng-deep .p-button {
          border-radius: 8px;

          &:hover {
            transform: scale(1.1);
          }
        }
      }
    }
  }

  .note-content-area {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 1rem !important;

    .note-fade-overlay {
      position: absolute;
      bottom: 0;
      left: 0;
      right: 0;
      height: 30px;
      background: linear-gradient(transparent, rgba(20, 20, 20, 0.9));
      pointer-events: none;
    }
  }

  .note-bottom-glow {
    position: absolute;
    bottom: -5px;
    left: 20%;
    right: 20%;
    height: 10px;
    background: linear-gradient(
        90deg,
        transparent,
        color-mix(in srgb, var(--primary-color), transparent 60%),
        transparent
    );
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(5px);
  }
}

.note-body {
  flex: 1;
  min-height: 0;
  max-height: 180px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: pre-wrap;
  padding-right: 8px;
  box-sizing: border-box;
  line-height: 1.6;
  color: #e2e8f0;

  @media (max-width: 768px) {
    max-height: 140px;
    font-size: 0.9rem;
  }

  @media (max-width: 480px) {
    max-height: 120px;
    font-size: 0.85rem;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.8;
  }
}
